package com.gxa.mapper.zijinmapper;

import com.gxa.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author zhaohaoc
 * @version 1.0
 * @date 2022/4/8 9:56
 */
public interface FuKuanMapper {

    List<GongYingShang> selectAllGongYingShang();

    List<ZhangHu> selectAllZhangHu();

    List<JieSuanWay> selectJieSuanWay();

    GongYingShang selectGongYingShangIdByGongYingShangMingCheng(
            @Param("gongYingShangMingCheng") String gongYingShangMingCheng
    );

    List<GouHuo> selectGouHuoDan(@Param("startTime") String startTime,
                                 @Param("endTime") String endTime,
                                 @Param("gongYingShangId")  String gongYingShangId,
                                 @Param("danJuBianHao") String danJuBianHao);

    List<FuKuanDan> selectFuKuanDan(@Param("startTime") String startTime,
                                    @Param("endTime") String endTime,
                                    @Param("fuKuanDanBianHao") String fuKuanDanBianHao,
                                    @Param("gongYingShangMingCheng") String gongYingShangMingCheng,
                                    @Param("fuKuanDanBeiZhu") String fuKuanDanBeiZhu);

    int addFuKuanDan(@Param("fuKuanDanRiQi") String fuKuanDanRiQi,
                     @Param("fuKuanDanBianHao") String fuKuanDanBianHao,
                     @Param("gongYingShangId") long gongYingShangId,
                     @Param("fuKuanDanZongJinE") String fuKuanDanZongJinE,
                     @Param("fuKuanDanBeiZhu") String fuKuanDanBeiZhu);

    long selectFuKuanDanByFuKuanBianHao(@Param("fuKuanDanBianHao") String fuKuanDanBianHao);

    int addFuKuanDanInFo(@Param("fuKuanDanId") long fuKuanDanId,
                         @Param("zhangHuId") long zhangHuId,
                         @Param("jieSuanWayId") long jieSuanWayId,
                         @Param("fuKuanJinE") BigDecimal fuKuanJinE);

    int addFuKuanGouHuo(@Param("fuKuanDanId") long fuKuanDanId,
                        @Param("gouHuoDanId") long gouHuoDanId);

    int updateFuKuanDan(@Param("fuKuanDanId") long fuKuanDanId,
                        @Param("fuKuanDanBeiZhu") String fuKuanDanBeiZhu,
                        @Param("fuKuanDanZongJinE") String fuKuanDanZongJinE);

    int updateFuKuanDanInFo(@Param("fuKuanDanId") long fuKuanDanId,
                            @Param("zhangHuId") long zhangHuId,
                            @Param("jieSuanWayId") long jieSuanWayId,
                            @Param("fuKuanJinE") BigDecimal fuKuanJinE);

    int delFuKuanDanByBianHao(@Param("fuKuanDanBianHao") String fuKuanDanBianHao);

    int delFuKuanDanInFo(@Param("fuKuanDanId") long fuKuanDanId);

    int delFuKuanGouHuo(@Param("fuKuanDanId") long fuKuanDanId);

    int updateFuKuanGouHuo(@Param("fuKuanDanId") long fuKuanDanId,
                           @Param("gouHuoDanId") long gouHuoDanId);
}
